#ifndef REGISTER_DIALOG_HPP
#define REGISTER_DIALOG_HPP

#include "trading_system.hpp"
#include <QDialog>
#include <QDoubleSpinBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QPushButton>
#include <QVBoxLayout>

class RegisterDialog : public QDialog {
  Q_OBJECT

public:
  explicit RegisterDialog(TradingSystem *tradingSystem,
                          QWidget *parent = nullptr);

  QString getUsername() const;
  QString getPassword() const;

private slots:
  void onRegisterClicked();

private:
  TradingSystem *m_tradingSystem;

  QLineEdit *m_usernameEdit;
  QLineEdit *m_passwordEdit;
  QLineEdit *m_confirmPasswordEdit;
  QDoubleSpinBox *m_initialBalanceSpinBox;
  QPushButton *m_registerButton;
  QPushButton *m_cancelButton;

  QString m_username;
  QString m_password;
};

#endif // REGISTER_DIALOG_HPP
